﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="DiemTheoLopHoc.aspx.cs" Inherits="WTSQCB.DiemTheoLopHoc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp; Nhập điểm theo lớp học</p>
    <p>
        &nbsp;
        Nhập mã học kì:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="MaHKtxt" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nhập mã Lớp:
        <asp:TextBox ID="MaLoptxt" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nhập mã môn học:
        <asp:TextBox ID="MaMonHoctxt" runat="server"></asp:TextBox>
&nbsp;<asp:Button ID="Locbtn" runat="server" OnClick="Locbtn_Click" Text="LỌC" Width="80px" />
    </p>
    <p>
        <asp:GridView ID="DiemThidgv" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnSelectedIndexChanged="DiemThidgv_SelectedIndexChanged1" AllowSorting="True" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4">
            <Columns>
                <asp:CommandField ShowSelectButton="True" ButtonType="Button" SelectText="CHỌN" />
                <asp:BoundField DataField="MaHocVien" HeaderText="Mã học viên" SortExpression="MaHocVien" />
                <asp:BoundField DataField="HoTen" HeaderText="Họ tên" SortExpression="HoTen" />
                <asp:BoundField DataField="TenLop" HeaderText="Tên lớp" SortExpression="TenLop" />
                <asp:BoundField DataField="TenHocKi" HeaderText="Tên học kì" SortExpression="TenHocKi" />
                <asp:BoundField DataField="TenMonHoc" HeaderText="Tên môn học" SortExpression="TenMonHoc" />
                <asp:BoundField DataField="DiemQuaTrinh" HeaderText="Điểm quá trình" SortExpression="DiemQuaTrinh" />
                <asp:BoundField DataField="DiemThi" HeaderText="Điểm thi" SortExpression="DiemThi" />
                <asp:BoundField DataField="DiemKetThuc" HeaderText="Điểm kết thúc" SortExpression="DiemKetThuc" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
    </p>
    <p>
        &nbsp;
        <asp:Button ID="Thembtn" runat="server" OnClick="Thembtn_Click" Text="Cập nhật vào CSDL" OnClientClick="return confirm('Bạn vui lòng kiểm tra cẩn thận. Nếu nhập sai phải liên hệ với Admin')" />
        &nbsp;
        <asp:Button ID="Suabtn" runat="server" OnClick="Suabtn_Click" Text="Nhập Điểm" Width="80px" />
&nbsp;</p>
    <p>
        &nbsp;
        Thông tin chi tiết:</p>
    <p>
        &nbsp;
        Mã học viên:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="MaHVtxt" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="MaHocVienrqf" runat="server" ControlToValidate="MaHVtxt" ErrorMessage="RequiredFieldValidator" ForeColor="Red">*</asp:RequiredFieldValidator>
    </p>
    <p>
        &nbsp;
        Tên Học viên:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TenHVtxt" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="TenHocVienrqf" runat="server" ControlToValidate="TenHVtxt" ErrorMessage="RequiredFieldValidator" ForeColor="Red">*</asp:RequiredFieldValidator>
    </p>
    <p>
        &nbsp;
        Điểm quá trình:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="DiemQTtxt" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="DiemQTrqf" runat="server" ControlToValidate="DiemQTtxt" ErrorMessage="RequiredFieldValidator" ForeColor="Red">*</asp:RequiredFieldValidator>
        <asp:RangeValidator ID="DiemQTrv" runat="server" ControlToValidate="DiemQTtxt" ErrorMessage="RangeValidator" ForeColor="Red" MaximumValue="10" MinimumValue="0" Type="Double">Điểm tử 0 - 10</asp:RangeValidator>
    </p>
    <p>
        &nbsp;
        Điểm thi:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="DiemThitxt" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="DiemThirf" runat="server" ControlToValidate="DiemThitxt" ErrorMessage="RequiredFieldValidator" ForeColor="Red">*</asp:RequiredFieldValidator>
        <asp:RangeValidator ID="DiemThirv" runat="server" ControlToValidate="DiemThitxt" ErrorMessage="RangeValidator" ForeColor="Red" MaximumValue="10" MinimumValue="0" Type="Double">Điểm từ 0 - 10</asp:RangeValidator>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebDiemTSQCBConnectionString %>" SelectCommand="BangNhapDiemLoadDuLieu" SelectCommandType="StoredProcedure" UpdateCommand="BangNhapDiemSua" UpdateCommandType="StoredProcedure">
            <UpdateParameters>
                <asp:Parameter Name="mahocvien" Type="String" />
                <asp:Parameter Name="diemquatrinh" Type="Double" />
                <asp:Parameter Name="diemthi" Type="Double" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </p>
</asp:Content>
